<fly:block name="nohting_search">
	<div class="nohting_search"><fly:variable name='nothing'/></div>
</fly:block>
<fly:block name="block_search">
	<fly:list name="list_category_map">
		<tr class="m_over" title="<fly:variable name='meta_title' />"
	       onmouseover="$(this).addClass('over');"
	       onmouseout="$(this).removeClass('over');" >
			<td>
		   		<div class="place_width">
		   		   <fly:block name="block_place_photo">
		   				<div class="location_photo">
		   					<fly:list name="location_photo">
			   					<a rel="/<fly:variable name='image_preview' />" href="<fly:variable name='url_photo' />" class="preview"><img src="/<fly:variable name="src_photo" />" width="<fly:variable name="width" />" height="<fly:variable name="height" />" /></a>
			   				</fly:list>
		   				</div>
		   			</fly:block>
		  			<div title="<fly:variable name='meta_title' />" class="title_location">
				   		<a href="<fly:variable name='url_category_map' />" title="<fly:variable name='meta_title' />">
				   			<fly:variable name="place_name" />
				   			<div class="block_title">
					   			<fly:variable name="place_description"/>
	   						</div>
				   		</a>
		  			</div>
			   </div>
			</td>
			<td title="<fly:variable name='province_meta_title' />"><a href="<fly:variable name='url_category_map' />"><fly:variable name="province" /></a></td>
			<td title="<fly:variable name='city_meta_title' />"><a href="<fly:variable name='url_category_map' />"><fly:variable name="city" /></a></td>
			<td><a href="<fly:variable name='url_category_map' />"><fly:variable name="price_sell" /></a></td>
			<td><a href="<fly:variable name='url_category_map' />"><fly:variable name="price_rental" /></a></td>
			<td><a href="<fly:variable name='url_category_map' />"><fly:variable name="status" /></a></td>
			<td class="droite">
				<fly:block name="visible">
					<fly:variable name='text_visible'/>
					<input class="invisible" id="<fly:variable name='id_category_map' />" type="button" value="<fly:variable name='button_2'/>" />								
				</fly:block>
				<fly:block name="invisible">
					<fly:variable name='text_invisible'/>
					<input class="visible" type="button" id="<fly:variable name='id_category_map' />" value="<fly:variable name='button_1'/>" />								
				</fly:block>
			</td>
		</tr>
	</fly:list>
	<script type="text/javascript">
		$(document).ready(function(data) {	
			$(".invisible").click(function(){
				$("#id_location").val($(this).attr('id'));
				$("#com").attr("name","invisible");
				$("#frm").submit();
			});
			$(".visible").click(function(){				
				$("#id_location").val($(this).attr('id'));
				$("#com").attr("name","visible");
				$("#frm").submit();
			});          
		});
	</script>
</fly:block>
<script type="text/javascript">
this.imagePreview = function(){	
	/* CONFIG */
		
		xOffset = 10;
		yOffset = 30;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
	$("a.preview").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("body").append("<p id='preview'><img src='"+ this.rel +"' alt='Image preview' />"+ c +"</p>");								 
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		$("#preview").remove();
    });	
	$("a.preview").mousemove(function(e){
		$("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};


// starting the script on page load
$(document).ready(function(){
	imagePreview();
});
</script>